#include <stdio.h>

int main() {
    int year, month, day;

    scanf("%d %d", &year, &month);
    if (month == 1 || month == 3 || month == 5 || 
        month == 7 || month == 8 || month == 10 || 
        month == 12) {
        day = 31;
    } else if (month == 4 || month == 6 || month == 9 ||
               month == 11) {
        day = 30;
    } else if (month == 2) {
        day = 28;
        if ((year % 4 == 0 && year % 100 != 0) || 
            (year % 400 == 0)) {
            day = 29;
        }
    }

    printf("year = %d, month = %d, day = %d\n", year, month, day);
    return 0;
}
